package cn.tinlan.shopcoin.Utils;

import android.content.Context;
import android.content.res.Resources;
import android.util.DisplayMetrics;

/**
 * Created by Mortimer on 2018/12/22. 18:27
 * 佛祖🙏，永无bug。
 */
public class DimenUtil {
    public static int getScreenWidth(final Context context){
        final Resources resources=context.getApplicationContext().getResources();
        final DisplayMetrics dm=resources.getDisplayMetrics();
        return dm.widthPixels;
    }
    public static int getScreenHeight(final Context context){
        final Resources resources=context.getApplicationContext().getResources();
        final DisplayMetrics dm=resources.getDisplayMetrics();
        return dm.heightPixels;
    }
}
